#ifndef D3D10SHAPES_QUAD_H
#define D3D10SHAPES_QUAD_H

#include "D3DUtilities.h"

namespace D3D10Shapes
{
	// Builds a quad in xz-plane.
	class Quad
	{
	public:
		Quad();
		~Quad();

		void init(ID3D10Device *device, const unsigned __int32 numRows, const unsigned __int32 numColumns, const float cellSpacing);
		void draw();

	private:
		void initVertexBuffer(const float cellSpacing);
		void initIndexBuffer();
	
	private:
		unsigned __int32 mNumRows;
		unsigned __int32 mNumColumns;

		unsigned __int32 mNumVertices;
		unsigned __int32 mNumFaces;

		ID3D10Device *mDevice;
		ID3D10Buffer *mVertexBuffer;
		ID3D10Buffer *mIndexBuffer;
	};
}

#endif // D3D10SHAPES_QUAD_H
